<?php
/**
 * @link https://www.kancloud.cn/cleverstone/ymb2
 * @copyright Copyright (c) 2020 Yii Manager Software LLC
 */

namespace backend\controllers;

use builder\base\BaseController;

/**
 * 错误机制
 * @author clevstn
 * @since ym2.0
 */
class ErrorController extends BaseController
{
    /**
     * @var array
     */
    public $publicActions = [
        'index'
    ];

    /**
     * {@inheritdoc}
     */
    public function actions()
    {
        if ($this->user->isGuest) {
            $this->layout = 'blank';
        }

        return [
            'index' => [
                'class' => 'yii\web\ErrorAction',
                'view' => 'index',
            ]
        ];
    }
}